HedgePolicyConfig
METADATA
| Attribute | Value |
|---|---|
| Topic | 1800-client-config |
| MLink Token | ClientControl |
| Product | SRControl |
| accessType | SELECT,UPDATE,INSERT,DELETE |
Table Definition
| Field | Type | Key | Default Value | Comment |
|---|---|---|---|---|
| accnt | VARCHAR(16) | PRI | '' | |
| clientFirm | VARCHAR(16) | PRI | '' | |
| policy | enum - HedgePolicy | PRI | 'None' | |
| autoHedgeEnabled | enum - YesNo | 'None' | ||
| hedgeWavesEnabled | enum - YesNo | 'None' | ||
| autoHedgeWindow | enum - AutoHedgeWindow | 'None' | ||
| autoHedgeNetting | enum - AutoHedgeNetting | 'None' | ||
| autoHedgeSymBandDD | FLOAT | 0 | individual hedge target hedge band delta hedge to zero when outside band | |
| modifiedBy | VARCHAR(24) | '' | user who last modified this record | |
| modifiedIn | enum - SysEnvironment | 'None' | ||
| timestamp | DATETIME(6) | '1900-01-01 00:00:00.000000' | timestamp of last modification | |
| HedgeWavesList | JSON | 'JSON_ARRAY()' |
PRIMARY KEY DEFINITION (Unique)
| Field | Sequence |
|---|---|
| accnt | 1 |
| clientFirm | 2 |
| policy | 3 |
JSON Block (HedgeWavesList)
| Field | Type | Comment |
|---|---|---|
| hedgePeriod | enum - HedgePeriod | |
| symHedgeBandDD | enum - symHedgeBandDD | individual hedge target hedge band delta |
| symHedgeBandGR | enum - symHedgeBandGR | individual hedge target hedge band gamma ratio |
| balanceSymbols | enum - YesNo | balance accnt level deltas from all symbols using this policy |
| hedgeSlice | enum - HedgeSlice | |
| hedgeObjective | enum - HedgeObjective |
CREATE TABLE EXAMPLE QUERY
CREATE TABLE `SRControl`.`MsgHedgePolicyConfig` (
`accnt` VARCHAR(16) NOT NULL DEFAULT '',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '',
`policy` ENUM('None','A','B','C','D','E') NOT NULL DEFAULT 'None',
`autoHedgeEnabled` ENUM('None','Yes','No') NOT NULL DEFAULT 'None',
`hedgeWavesEnabled` ENUM('None','Yes','No') NOT NULL DEFAULT 'None',
`autoHedgeWindow` ENUM('None','Immediate','Sec_5','Sec_15','Sec_30','Sec_60') NOT NULL DEFAULT 'None',
`autoHedgeNetting` ENUM('None','Pct_25','Pct_50','Pct_100') NOT NULL DEFAULT 'None',
`autoHedgeSymBandDD` FLOAT NOT NULL DEFAULT 0 COMMENT 'individual hedge target hedge band ($delta) (hedge to zero when outside band)',
`modifiedBy` VARCHAR(24) NOT NULL DEFAULT '' COMMENT 'user who last modified this record',
`modifiedIn` ENUM('None','Neptune','Pluto','V7_Stable','V7_Latest','Saturn','Venus','Mars','SysTest','V7_Current') NOT NULL DEFAULT 'None',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'timestamp of last modification',
`HedgeWavesList` JSON NOT NULL DEFAULT JSON_ARRAY() CHECK(JSON_VALID(HedgeWavesList)),
PRIMARY KEY USING HASH (`accnt`,`clientFirm`,`policy`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='';
SELECT TABLE EXAMPLE QUERY
SELECT
`accnt`,
`clientFirm`,
`policy`,
`autoHedgeEnabled`,
`hedgeWavesEnabled`,
`autoHedgeWindow`,
`autoHedgeNetting`,
`autoHedgeSymBandDD`,
`timestamp`,
`HedgeWavesList`
FROM `SRControl`.`MsgHedgePolicyConfig`
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm'
AND
/* Replace with a ENUM('None','A','B','C','D','E') */
`policy` = 'None';
UPDATE TABLE EXAMPLE QUERY
UPDATE `SRControl`.`MsgHedgePolicyConfig`
SET
/* Replace with a ENUM('None','Yes','No') */
`autoHedgeEnabled` = 'None',
/* Replace with a ENUM('None','Yes','No') */
`hedgeWavesEnabled` = 'None',
/* Replace with a ENUM('None','Immediate','Sec_5','Sec_15','Sec_30','Sec_60') */
`autoHedgeWindow` = 'None',
/* Replace with a ENUM('None','Pct_25','Pct_50','Pct_100') */
`autoHedgeNetting` = 'None',
/* Replace with a FLOAT */
`autoHedgeSymBandDD` = 1.23,
/* Replace with a DATETIME(6) */
`timestamp` = '2022-01-01 12:34:56.000000',
/* Replace with a JSON */
`HedgeWavesList` = '{"key": "value"}'
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm'
AND
/* Replace with a ENUM('None','A','B','C','D','E') */
`policy` = 'None';
INSERT TABLE EXAMPLE QUERY
INSERT INTO `SRControl`.`MsgHedgePolicyConfig`(
/* Replace with a VARCHAR(16) */
`accnt`,
/* Replace with a VARCHAR(16) */
`clientFirm`,
/* Replace with a ENUM('None','A','B','C','D','E') */
`policy`,
/* Replace with a ENUM('None','Yes','No') */
`autoHedgeEnabled`,
/* Replace with a ENUM('None','Yes','No') */
`hedgeWavesEnabled`,
/* Replace with a ENUM('None','Immediate','Sec_5','Sec_15','Sec_30','Sec_60') */
`autoHedgeWindow`,
/* Replace with a ENUM('None','Pct_25','Pct_50','Pct_100') */
`autoHedgeNetting`,
/* Replace with a FLOAT */
`autoHedgeSymBandDD`,
/* Replace with a DATETIME(6) */
`timestamp`,
/* Replace with a JSON */
`HedgeWavesList`
)
VALUES(
'Example_accnt',
'Example_clientFirm',
'None',
'None',
'None',
'None',
'None',
1.23,
'2022-01-01 12:34:56.000000',
'{"key": "value"}'
);
DELETE TABLE EXAMPLE QUERY
DELETE FROM `SRControl`.`MsgHedgePolicyConfig`
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm'
AND
/* Replace with a ENUM('None','A','B','C','D','E') */
`policy` = 'None';
Doc Columns Query
SELECT * FROM SRControl.doccolumns WHERE TABLE_NAME='HedgePolicyConfig' ORDER BY ordinal_position ASC;